package cn.community.system.service;

import cn.community.system.domain.Role;
import cn.community.system.query.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface IRoleService {
    void delete(Long id);
    void save(Role role);
    Role get(Long id);
    List<Role> listAll();
    void update(Role role);

    /**
     * 分页
     * @param qo
     * @return
     */
    PageInfo query(QueryObject qo);

    void deleteRelation(Long id);

    void insertRelation(@Param("rid") Long rid, @Param("pid") Long pid);

    Long searchRelation(@Param("rid")Long rid,  @Param("pid")Long pid);

    void deleteByRidAndPid(@Param("rid")Long rid, @Param("pid")Long pid);
}
